<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .row {
            display: flex;
            justify-content: space-evenly;
            margin-top: 20px;
            width: 550px;
        }

        .row div {
            width: 120px;
            height: 50px;
            line-height: 50px;
            border: 1px solid #000;
            border-radius: 20px;
            text-align: center;
        }

        .row div:hover {
            background-color: #F00;
            color: #FFF;
        }

        .row:last-child {
            margin-top: 20px;
        }

        .book {
            width: 400px;
            border: 1px solid black;
            border-radius: 20px;
            margin-top: 100px;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="row">
    <div id="day_1">1天</div>
    <div id="day_2">3天</div>
    <div>5天</div>
    <div>7天</div>

</div>
<div class="row">
    <div>15天</div>
    <div>30天</div>
    <div>60天</div>
    <div>180天</div>
</div>

<div class="book">this is a book</div>

<script>
    let day_1 = document.getElementById("day_1")
    day_1.addEventListener('click', function () {
        day_1.style.setProperty('background-color', '#FF0')
        day_1.style.setProperty('color', '#F00')

        day_2.style.setProperty('background-color', '#FFF')
        day_2.style.setProperty('color', '#000')
    })

    let day_2 = document.getElementById("day_2")
    day_2.addEventListener('click', function () {
        day_2.style.setProperty('background-color', '#FF0')
        day_2.style.setProperty('color', '#F00')

        day_1.style.setProperty('background-color', '#FFF')
        day_1.style.setProperty('color', '#000')
    })

</script>
</body>
</html>